package com.itheima.api2;

public class Demo1 {
    public static void main(String[] args) {
        int result=getJc(100);
        System.out.println(result);
    }

    private static int getJc(int i) {
        if (i==1){
            return 1;
        }else{
            return i+getJc(i-1);
        }
    }
}
